from fastapi import APIRouter, WebSocket

router = APIRouter(prefix="/test")


# 路径参数
@router.get('/items/{item_id}')
async def read_item(item_id):
    return {"item_id": item_id}


# 有类型的路径参数
@router.get('/items1/{item_id_1}')
async def read_item_with_type(item_id_1: int):
    return {"item_id": item_id_1}




